using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro; // Ensure you have TMPro namespace for TextMeshPro

public class TargetPanel : MonoBehaviour
{
    public Antenna antenna;
    public TextMeshPro targetTextTMP;
    public int targetText = 0;

    public void ShowNewNumber()
    {
        // Generate a random number from the Antenna and show on panel
        int randomValue = antenna.GenerateRandomNumber();
        UpdateTargetText(randomValue);
    }

    public void UpdateTargetText(int value)
    {
        targetTextTMP.text = value.ToString();
        targetText = value;
    }

    public void ClearPanel()
    {
        targetTextTMP.text = "..";
    }
}
